\name{TimeSeriesRead}
\alias{TimeSeriesRead}
\title{Read Time Series}
\usage{
  TimeSeriesRead(infile, comment = FALSE,
    duplicates.remove = FALSE, env = SetEnv())
}
\arguments{
  \item{infile}{Full file name of the the GEOtop time
  series file to be read.}

  \item{comment}{Option to return only the comment line(s)
  of a file. The default is FALSE and only the file data is
  returned. If several recovered file comments are read,
  they are all returned together.}

  \item{duplicates.remove}{Optional vector [e.g., c(2,3,4)]
  of columns to duplicates.remove is FALSE, preventing
  duplicate removal. Duplicate removal is recommended when
  a simulation has been recovered and possibly several
  files exist for one type of output. Usual columns for
  duplicate removal are Date, period, run, pointID.}

  \item{env}{List that passes a number of default
  settings.}
}
\value{
  Returns a data frame. The first column, named "Date", is
  in POSIXct and referenced to UTC. All other columns are
  numeric and have nodata indicated by NA. The nodata value
  used is set in SetEnv() and can be changed manually. If a
  simulation has been recovered (possibly several times),
  files written by recovered runs are also read and merged
  into one data frame.
}
\description{
  Read GEOtop time series into data frame
}
\details{
  This function reads a GEOtop time series such as a meteo
  file or a result from file. The first column is
  considered date/time and converted to POSIXct in UTC.
}
\examples{
meteo <- TimeSeriesRead("./data/meteo0001.txt", env = SetEnv())
}
\author{
  Stephan Gruber <stephan.gruber@carleton.ca>
}

